package com.sh.redis.controller;

public class Erfenfa {

    public static void main(String[] args) {
        System.out.println(ErfenfaFind(26));
    }


    public static int ErfenfaFind(int i){
        int l=2,r=i;
        int index = -1;
        int mid = 0;
        while (l<=r){
            mid = l+(r-l)/2;
            if(mid* mid <= i){
                index = mid;
                l = mid +1 ;
            }else{
                r = mid - 1;
            }
        }
        return index;
    }
}
